﻿@using Jizsoft.JFrame.Identity.Web.Models;
@{
    ViewBag.Title = "AskUser";
    Layout = "~/Views/Shared/_LayoutWithoutUser.cshtml";
}
@model IEnumerable<RequestItem>


<div class="page-content">
    <div class="row">
        <div class="col-sm-offset-2 col-sm-8 well">
            <h2>
                访问授权
            </h2>
            <form method="post" action="AskUserResponse">
                @Html.AntiForgeryToken()
                @Html.Hidden("confirmed", "false")
                <div>
                    <div id="user-profile-1" class="user-profile row">
                        <div class="col-xs-12 col-sm-3 center">
                            <div>
                                <span class="profile-picture">
                                    <img id="avatar" class="img-responsive" style="width:90px; height:90px;" alt="@Html.Encode(ViewData["NickName"])'s Avatar" src="../../content/avatars/profile-pic.jpg" />
                                </span>
                                <div class="space-4"></div>
                                <div class="width-80 label label-info label-xlg arrowed-in arrowed-in-right">
                                    <div class="inline position-relative">
                                        <a href="#" class="user-title-label dropdown-toggle" data-toggle="dropdown">
                                            <span class="white">@Html.Encode(ViewData["NickName"])</span>
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12 col-sm-9">
                            <p>
                                是否允许登录到：<b class="text-warning">@Html.Encode(ViewData["Realm"])</b>
                            </p>
                            <div>
                                <p>对方请求获得下列信息：</p>
                                <ul class="list-unstyled spaced">
                                    @foreach (var item in Model)
                                    {
                                        <li>
                                            <i class="icon-large icon-ok green"></i>@item.Name
                                        </li>
                                    }
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="center">
                    <button class="btn btn-lg btn-success" type="submit" onclick="document.getElementsByName('confirmed')[0].value = 'true'; return true;">
                        <i class="icon-ok"></i>
                        授权
                    </button>
                    <button class="btn btn-lg btn-info" type="submit">
                        <i class="icon-undo"></i>
                        取消
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
